﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace _05_线程调试
{
    internal class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < 3; i++)
            {
                new Thread(new ThreadStart(DoWork)) { IsBackground = true,Name="线程-" +(i+1) }.Start();
            }
            Console.Read();
        }

        public static void DoWork()
        {
            for (int i = 0; i < 30; i++)
            {
                Console.WriteLine("DoWork:{0}", i);
                Thread.Sleep(200); 
            }
        }

    }
}
